import 'dart:io';

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:leader_doctor_flutter/common/utils/meeting_utils.dart';
import 'package:leader_doctor_flutter/common/widget/comm_widget.dart';
import 'dart:developer' as dev;

import 'package:leader_doctor_flutter/plugins/plugins_messages.g.dart';
import 'package:leader_doctor_flutter/ui/task/meeting/model/result.dart';
import 'package:netease_meeting_ui/meeting_ui.dart';

/// @Author lixiaobin
/// @Date 2023/11/29
/// @Description
class MeetingPage extends StatefulWidget {
  final String mdtId;

  const MeetingPage({super.key, required this.mdtId});

  @override
  State<MeetingPage> createState() => _MeetingPageState();
}

class _MeetingPageState extends State<MeetingPage> {
  @override
  void initState() {
    // androidUIOverlayStyle();
    // MeetingUtils.instance.joinMeeting(context, '12951');
    MeetingUtils.instance.joinMeeting(context, widget.mdtId);
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: CommWidget.getCommAppbar(context),
      body: Container(),
      backgroundColor: Colors.transparent,
    );
  }
}

/// 安卓状态栏颜色设置
void androidUIOverlayStyle() {
  if (Platform.isAndroid) {
    SystemUiOverlayStyle systemUiOverlayStyle = const SystemUiOverlayStyle(
      statusBarColor: Colors.black,
      statusBarBrightness: Brightness.dark,
    );
    SystemChrome.setSystemUIOverlayStyle(systemUiOverlayStyle);
  }
}
